package com.billion.payment.service;

import com.alibaba.fastjson.JSONObject;
import com.billion.payment.entity.weixin.WxOrderEntity;
import com.billion.payment.entity.weixin.WxPayEntity;
import com.billion.payment.entity.weixin.WxRefundEntity;

public interface IWxpayService {

    /**
     * 微信统一下单
     * @param wxOrderEntity
     * @return
     */
    JSONObject unifiedOrder(WxOrderEntity wxOrderEntity);

    /**
     * 微信支付
     * @param wxPayEntity
     * @return
     */
    JSONObject microPay(WxPayEntity wxPayEntity);

    /**
     * 微信退款
     * @param wxRefundEntity
     * @return
     */
    JSONObject refund(WxRefundEntity wxRefundEntity);

    /**
     * 获取微信openid
     * @param appId
     * @param secret
     * @param code
     * @return
     */
    String getOpenId(String appId, String secret, String code);
}
